package com.mornd.gulimall.product.entity.vo.spusave;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author: mornd
 * @dateTime: 2023/8/3 - 21:47
 * 规格参数
 */

@Getter
@Setter
public class SpecVo {

    @NotNull(message = "规格参数id不能为空")
    @Min(value = 1, message = "非法的规格参数id")
    private Long attrId;

    @NotBlank(message = "规格参数属性值不能为空")
    private String value;

    @Range(min = 0, max = 1, message = "规格参数的快速展示值不正确")
    private int showDesc;
}
